import StoreLine from './store-line'
export default class Line {
  /**
   * 线路实体
   * @param {string} id 标识符
   * @param {string} name 线路名
   * @param {string} start 起始站
   * @param {string} end 终点站
   * @param {number} nowStopNum 现在距离站数，0-即将到站，-99-已经到站，<0 暂无车辆信息,> 0 距离几站
   * @param {StoreLine} storeline 存储实体
   * @param {boolean} [collected=false] 是否已收藏
   * @memberof Line
   */
  constructor(id, name, start, end, nowStopNum, storeline, collected = false) {
    this.id = id
    this.name = name
    this.start = start
    this.end = end
    this.nowStopNum = nowStopNum
    if (storeline) {
      this.storeline = storeline
    } else {
      this.storeline = new StoreLine()
    }
    this.collected = collected
  }
}
